package com.banach.prema.executor;

import com.banach.prema.dto.vo.ContactVO;
import com.banach.prema.repository.ContactRepository;
import com.ego.framework.core.context.UserHolder;
import com.ego.framework.dto.Response;
import com.ego.framework.model.LoginUser;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author ajun
 *
 */
@RestController
public class ContactQueryExe {

	@Resource
	private ContactRepository contactRepository;

	public Response<List<ContactVO>> selectList(){
		LoginUser loginUser = UserHolder.getLoginUser();
		return Response.of(contactRepository.selectByUserId(loginUser.getId()));
	}

}
